package com.ruijie.autotest.log.core.data;

import java.util.Iterator;

public interface ITable extends Iterable<IRow> {
	IRow getRow(int rowAt);

	int count();

	default Iterator<IRow> iterator() {
		return new Iterator<IRow>() {
			private int index = 0;

			@Override
			public boolean hasNext() {
				return index != count();
			}

			@Override
			public IRow next() {
				IRow result = getRow(index);
				index++;
				return result;
			}
		};
	}
}
